﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Medical.Business;

public partial class control_TopDoctor : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //专家团队
            DataTable dtDoctor = new BisArticle().GetTopArticle(6, ArticelTypeEnum.Expert, 53);
            rptDoctor.DataSource = dtDoctor;
            rptDoctor.DataBind();
        }
    }

    /// <summary>
    /// 列表绑定处理
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void rptDoctor_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataTable dtSort = (DataTable)((Repeater)sender).DataSource;
        Literal ltlInfo = e.Item.FindControl("ltlInfo") as Literal;
        string strInfo = strInfo = Common.NoHTML(dtSort.Rows[e.Item.ItemIndex]["Info"].ToString());
        ltlInfo.Text = (strInfo.Length > 25 ? strInfo.Substring(0, 25) : strInfo) + "…";
    }
}